/*
 * Copyright (c) 2010-2013 Ruben Chakhmakhchyan. All rights reserved.
 * 
 * This file contains Original Code and/or Modifications of Original Code
 * as defined in and that are subject to the Eclipse Public License
 * Version 1.0 (the 'License'). You may not use this file except in
 * compliance with the License. Please obtain a copy of the License at
 * http://opensource.org/licenses/EPL-1.0 and read it before using this file.
 */

#pragma once

#include "commontypes.h"
#include <windows.h>


class Dib
{
public:

    static void* GetBits( PBITMAPINFOHEADER pbih );

    // Gets the DIB stride
    static uint_t GetStride( PBITMAPINFOHEADER pbih );

    // Gets the DIB stride
    static size_t GetStride( size_t width, size_t bitCount );

    // Gets the DIB direction
    static void CheckDirection( BITMAPINFOHEADER* pBih );

    // Calculates the DIB size based on its dimentions and bits per pixel
    static size_t GetSize( size_t width, size_t height, size_t bitCount );
};
